<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<meta name="decorator" content="sysDefault" />
<script
	src="${staticPath}/lib/jquery-datatables/1.9.4/js/jquery.dataTables.min.js"
	type="text/javascript"></script>
	<script type="text/javascript" src="${staticPath}/lib/jquery/1.10.2/jquery.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
	});
	function funform(url, target) {
		window.open(url, target);
	}
</script>
</head>
<body>
	<div class="container-fluid">
		<div class="row">
			<div class="col-xs-12">
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title">
							城市管理列表
							<button class="btn btn-success btn-sm pull-right" onclick="funform('${contextPath}/sys/base/city/addCity','_self');">新增</button>
						</h3>
					</div>
						
						<form:form id="dataForm"  name="listForm" modelAttribute="sysBaseCity"
							action="${contextPath}/sys/base/city/getCityList"
							class="navbar-form navbar-left" role="search" method="get">
							<div class="form-group">
								<form:input path="name" class="form-control" placeholder="城市名称" />
							</div>
							<div class="form-group">
								<form:input path="zipCode" class="form-control"
									placeholder="邮政编码" />
							</div>
							<div class="form-group">
								<form:input path="code" class="form-control" placeholder="城市编码" />
							</div>
							<button class="btn btn-primary" type="submit">查询</button>
						</form:form>
					<tags:message content="${message}" />
					<table class="table table-striped table-bordered table-hover">
						<thead>
							<tr>
								<th>城市名称</th>
								<th>电话区号</th>
								<th>邮政编码</th>
								<th>城市编码</th>
								<th>省州编码</th>
								<th>省州名称</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach var="city" items="${page.list}" varStatus="i">
								<tr>
									<td>${city.name}</td>
									<td>${city.teleCode}</td>
									<td>${city.zipCode }</td>
									<td>${city.code}</td>
									<td>${city.stateCode}</td>
									<td>${city.stateName}</td>
									<td><a
										href="${contextPath}/sys/base/city/viewCity?code=${city.code}&stateName=${city.stateName}">查看</a>
										<a
										href="${contextPath}/sys/base/city/updateCity?code=${city.code}&stateName=${city.stateName}">修改</a>
										<a
										href="${contextPath}/sys/base/city/removeCity?code=${city.code}&stateName=${city.stateName}"
										onclick="return Oosp_Confirm('确认要删除该条数据吗？', this.href)">删除</a>
									</td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
					<div class="panel-footer">
						<pager:pager pageSize="${page.pageSize}" pageNo="${page.pageNo}"
							url="" total="${page.total}" />
						<script type="text/javascript" src="${staticPath}/js/list.js"></script>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>